package com.wwtech.epp.entity.appmessage;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 作者：Android on 2017/10/17
 * 邮箱：365941593@qq.com
 * 描述：具体消息体
 */

public class AppMessage implements Parcelable{

    /**
     * actionUrl :
     * appId : 17
     * appMsginfolder : 0
     * appName : 日程提醒
     * resourceUrl : https://s3.cn-north-1.amazonaws.com.cn/zxl/app/work_schedule.png
     */

    private String actionUrl;
    private int appId;
    private int appMsginfolder;
    private String appName;
    private String resourceUrl;
    private int targetId;
    private int messageId;

    public int getMessageId() {
        return messageId;
    }

    public void setMessageId(int messageId) {
        this.messageId = messageId;
    }

    public int getTargetId() {
        return targetId;
    }

    public void setTargetId(int targetId) {
        this.targetId = targetId;
    }

    protected AppMessage(Parcel in) {
        actionUrl = in.readString();
        appId = in.readInt();
        appMsginfolder = in.readInt();
        appName = in.readString();
        resourceUrl = in.readString();
        recivedTime = in.readLong();
        content = in.readString();
        messageId = in.readInt();
    }

    public static final Creator<AppMessage> CREATOR = new Creator<AppMessage>() {
        @Override
        public AppMessage createFromParcel(Parcel in) {
            return new AppMessage(in);
        }

        @Override
        public AppMessage[] newArray(int size) {
            return new AppMessage[size];
        }
    };

    public long getRecivedTime() {
        return recivedTime;
    }

    public void setRecivedTime(long recivedTime) {
        this.recivedTime = recivedTime;
    }

    private long recivedTime;

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    private String content;

    public String getActionUrl() {
        return actionUrl;
    }

    public void setActionUrl(String actionUrl) {
        this.actionUrl = actionUrl;
    }

    public int getAppId() {
        return appId;
    }

    public void setAppId(int appId) {
        this.appId = appId;
    }

    public int getAppMsginfolder() {
        return appMsginfolder;
    }

    public void setAppMsginfolder(int appMsginfolder) {
        this.appMsginfolder = appMsginfolder;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public String getResourceUrl() {
        return resourceUrl;
    }

    public void setResourceUrl(String resourceUrl) {
        this.resourceUrl = resourceUrl;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(actionUrl);
        dest.writeInt(appId);
        dest.writeInt(appMsginfolder);
        dest.writeString(appName);
        dest.writeString(resourceUrl);
        dest.writeLong(recivedTime);
        dest.writeString(content);
        dest.writeInt(messageId);
    }
}
